//文章有关的接口
import request from "@/utils/request"
//导入@/stores/token.js

// import {useTokenStore} from '@/stores/token.js'
//获取tokentoken
    // const tokenStore = useTokenStore();



//提供获取文章分类的接口
export const articleCategoryService =() =>{
    
    return request.get("/category");
}

//提供添加文章分类的接口
export const addCategoryService =(data) =>{
    return request.post("/category",data);
}

//提供更新文章分类的接口
export const updateCategoryService =(data) =>{
    return request.put("/category",data);
}


//删除分类的接口
export const deletedeleteCategoryService =(id) =>{
    //请求参数格式queryString
    //localhost:8080/category?id=1
    return request.delete("/category?id="+id);
}

